
import 'package:flutter/cupertino.dart';
import 'package:flutter_app/openeye/widget/loading_state_widget.dart';

class BaseChangeNotifier extends ChangeNotifier{
  ViewState viewState = ViewState.loading;
  //页面销毁就不发送通知
  bool _dispose = false;
  @override
  void dispose() {
    super.dispose();
    _dispose = true;
  }

  @override
  void notifyListeners() {
    if(!_dispose){
      super.notifyListeners();
    }
  }
}
